package com.xiaoshuidi.cloud.module.finance.mq.producer;

import lombok.extern.slf4j.Slf4j;
import org.springframework.cloud.stream.function.StreamBridge;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;
import java.util.List;

@Slf4j
@Component
public class FinanceBankTransferProducer {
    @Resource
    private StreamBridge streamBridge;

    public void send(List<String> numbers) {
        numbers.forEach(n -> streamBridge.send("bankTransfer-out-0", n));
    }
}
